package com.itliang.core.model.entity.equipment;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.itliang.config.DoubleSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 统计表
 *
 * @TableName statistics
 */
@TableName(value = "statistics")
@Data
public class Statistics implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 编码
     */
    private String code;

    /**
     * 设备类型
     */
    private Long dataType;

    /**
     * 最大值
     */
    @JsonSerialize(using = DoubleSerialize.class)
    private Double max;

    /**
     * 最小值
     */

    @JsonSerialize(using = DoubleSerialize.class)
    private Double min;

    /**
     * 平均值
     */

    @JsonSerialize(using = DoubleSerialize.class)
    private Double average;

    /**
     * 总数
     */
    private Long total;

    /**
     * 异常数
     */
    private Long exception;

    /**
     * 正常数
     */
    private Long normal;

    /**
     * 统计开始日期
     */
    private Date countBeginDate;

    /**
     * 统计结束日期
     */
    private Date countEndDate;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}